package cn.slt.mapper;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Repository;

import cn.slt.domian.MD_ClassDSID;
import cn.slt.domian.MD_ObjDSID;
import cn.slt.domian.MD_libraryDSID;

@Repository  
public class TestExportExcelDaoImpl 
{  
    @Resource  
    private SqlSessionFactory factory;  
      
    /** 
     * 以goods表为例导出测试 
     */  
     
    public List<MD_ObjDSID> exportExcel3(String hql,String str)  
    {  
        SqlSession session = factory.openSession();  
        List<MD_ObjDSID> list = session.selectList(hql,str); 
        session.close();
        System.out.println("list ok");
        System.out.println(list.toString());
        return list;  
    }  
    public List<MD_ClassDSID> exportExcel2(String hql,String str)  
    {  
        SqlSession session = factory.openSession();  
        List<MD_ClassDSID> list = session.selectList(hql,str); 
        session.close();
        System.out.println("list ok");
        System.out.println(list.toString());
        return list;  
    }  
    public List<MD_libraryDSID> exportExcel1(String hql,String str)  
    {  
        SqlSession session = factory.openSession();  
        List<MD_libraryDSID> list = session.selectList(hql,str); 
        session.close();
        System.out.println("list ok");
        System.out.println(list.toString());
        return list;  
    }  
}  
